 <meta charset="utf-8">
 <div class="box" id="biz_lauthuser_conatainer">
            <div class="box-header with-border">
               <form id="searchForm" role="form" class="form-inline">
                    <div class="form-group">
                         <label>账号</label>
                         <input name="name" v-model="searchForm.name"   type="text" placeholder="" class="form-control">
                    </div>
                     <button type="button"  class="btn btn-info pull-right m-t-n-xs" v-kperms="{perm:'authRole:loadAuthRoleList'}"  v-on:click="search();"><strong>查询</strong></button>
                </form>
            </div>
 <div class="box-body">
 	                           <div class="btn-group " id="lauthuserBTableToolbar" role="group">
 	                           		<button type="button" v-kperms="{perm:'authRole:addRole'}"  class="btn btn-default" v-on:click="add">
                                        <i class="glyphicon glyphicon-plus" aria-hidden="true"></i> 添加
                                    </button>
                                     <button type="button"  v-kperms="{perm:'authRole:updateRole'}" class="btn btn-default" v-on:click="resetpwd">
                                        <i class="glyphicon glyphicon-pencil" aria-hidden="true"></i> 修改密码
                                    </button>
                                       <button type="button"  v-kperms="{perm:'authRole:deletAuthRole'}" class="btn btn-default" v-on:click="deletex">
                                        <i class="glyphicon glyphicon-trash" aria-hidden="true"></i> 删除
                                    </button>
                           </div>
                                
           <table id="lauthuserBTable" data-mobile-responsive="true" ></table>
 </div>
 </div>

<script> 
new Vue({  
	  el: '#biz_lauthuser_conatainer',  
	  data:{
		  searchForm:{
			  name: null,
		  },
		  bus:new Vue(),
	  },
	  mounted:function(){
		 let _this=this;
		 _this.initTable();
	  },
  methods: {
	  initTable:function(){
		  let columns=[
				{checkbox:true,width:20},
				{field:'account',title:'账号',width:960,sortable:true}];
		  let url="tcms/lauthUser/loadLAuthUserDataSet";
  		zfesBstable.laodTable($("#lauthuserBTable"),$("#searchForm"),$("#lauthuserBTableToolbar"),url,columns,this.searchForm);
	  },
	  search:function(){
		  zfesBstable.reload($("#lauthuserBTable")); 
	  },
	  refresh:function(){
		  zfesBstable.refresh($("#lauthuserBTable"));
	  },
	  add:function(){
		  let　_this=this;
		 var url="/view/tcms/lauthuser/lauthuser.add.html";
		 zfesLayerEditDg.open(url,{},"账号信息编辑",460,function(){_this.refresh();});
		 
	  },
	  resetpwd:function(){
		  if(zfesBstable.isOneRow($("#lauthuserBTable"))){
			  let　_this=this;
			  let id=zfesBstable.getRowId($("#lauthuserBTable"));
			  var url="/view/tcms/lauthuser/lauthuser.setpwd.html";
			  zfesLayerEditDg.open(url,{"id":id},"账号信息编辑",460,function(){_this.refresh();}); 
		 }
	  },
	
	  deletex:function(){
			if(zfesBstable.isOneRow($("#lauthuserBTable"))){
				  let　_this=this;
					var id=zfesBstable.getRowId($("#lauthuserBTable"));
					 alertSwal.confirm("删除","是否执行该操作",function(){
						    let ajaxUrl = "tcms/lauthUser/deletLAuthUser";
							zfesAjax.ajaxTodo(ajaxUrl, { "id" : id}, function(data) {
								alertSwal.successText(data.message);
								_this.refresh();
							},function(data){
								
							}); 
				});
			}
				
	  }
 }

});
</script>


